package com.wunu.smartlock1.net.api;

import com.wunu.smartlock1.net.param.SubmitTempKeyParam;
import com.wunu.smartlock1.net.response.ApiNormalResponse;
import com.wunu.smartlock1.net.response.ApiSimpleResponse;
import com.wunu.smartlock1.net.response.TempKey;
import com.wunu.smartlock1.net.response.TempKeyDetail;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Query;

public interface LockTempKeyApi {

    @GET("genTempKey")
    Call<ApiNormalResponse<TempKey>> genTempKey(@Query("lockId") long lockId);

    @POST("genTempKey")
    Call<ApiSimpleResponse> submitTempKey(@Body SubmitTempKeyParam param);

    @POST("tempKey")
    Call<ApiSimpleResponse> confirmTempKey(@Query("tempKeyId") long tempKeyId);

    @GET("tempKey")
    Call<ApiNormalResponse<TempKeyDetail>> tempKeyDetail(@Query("tempKeyId") long tempKeyId);

    @GET("tempKey")
    Call<ApiNormalResponse<TempKeyDetail>> receiveTempKey(@Query("tempKeyId") long tempKeyId);
}